This release note gives a brief description of the sample printing applications, drivers and extensions. Detailed explanations of most of these samples are contained within their respective folders.
The samples are, for the most part, written in MPW C 3.3.1. A few of the samples are written in Think C 6.0.
In order to build the MPW code, you will need to edit the one or two lines in the makefiles which point to your QuickDraw GX “Interfaces & Libraries:Interfaces:” folder.
Brief Descriptions
-----------------
Simple Print -
An application that prints a bunch of rotated rectangles. This sample demonstrates the minimal amount of code needed to print from a QuickDraw GX application.
All Shapes with Printing -
This application is a spin-off of the “All Shapes” graphics sample. In addition to printing, this sample also has support for multiple documents.
Banana Jr. -
This application not only has a goofy name, it also has code to handle by-page formatting, multiple documents containing multiple pages, application overrides, and adding panels to dialogs. It’s a good environment for experimenting with GX printing from an application's point of view.
Getting Started w/GX -
This application was used in the "Getting started with QuickDraw GX" session at the 1993 WWDC. It demonstrates how to perform basic graphics and typography operations, as well as how to print the results.
Experiment no.9 -
Experiment no.9 is an application which was written to test snippets of QuickDraw GX printing code before rolling them into Inside Macintosh. It grew and grew until it became what it is now-- a heaping helping of basic, intermediate, and advanced QuickDraw GX printing snippets.
“kabooms…” -
These two printing extensions (and the documentation that accompany them) illustrate a potential problem when using global data in a printing extension or printer driver. Of course, a work-around is also provided.
Confidential -
This printing extension adds a text stamp on each page printed--you specify the text and font size.
Backwash -
Backwash allows you to select a PICT file which will be translated into a QuickDraw GX shape and then used as a backdrop on each printed page.
Extension Shell -
This printing extension is an excellent shell to build from whenever you need to write a new QuickDraw GX printing extension. It contains resources and code for initializing an A5 world (so you can use global data), adding a panel to a dialog, and performing a simple override. Since so much of the code and resources stay the same from printing extension to printing extension, this shell can save you loads of time. If you build and install the extension as it is, It will make your Macintosh beep every time a page is spooled to disk. Very annoying, but a good example of how to create a simple override.
PostScript Extension -
This is a modified version of the "Extension Shell." This sample overrides a PostScript imaging message to beep whenever your Macintosh starts to send a page to the printer. You need to set up your override resources slightly differently when you override imaging system specific (PostScript, raster, or vector) messages. This sample shows you what to do. Naturally, this printing extension only functions with PostScript printer drivers.
UserItems -
Although QuickDraw GX provides several types of panel controls, sometimes your needs require a bit more flexibility. With the Dialog Manager, an easy solution to this problem is to create userItems. Not suprisingly, we've seen developers try to use that approach with their GX print panels.
Unfortunately, for reasons explained in the "About UserItems…" file, you must do some extra work to support userItems within a print panel. This sample shows you how to make your panel's userItems work within the QuickDraw GX messaging system.
Spooling Extension -
This printing extension lets you redirect spool files to another volume, either connected to your Mac or across a network. QuickDraw GX normally spools all documents to your boot volume. If you don’t have much space available on your boot volume, use this extension to spool to another.
Additions Source-
This is the source code for the Additions printing extension. This extension allows you to change the appearance of printed pages in various ways.
Sample Printer Drivers -
ImageWriter -
ImageWriter LQ -
LaserWriter IISC -
LaserWriterIIg -
HPXL -
Sample code for working IISC, IIg, ImageWriter II, ImageWriter LQ, and PaintJet XL printer drivers.
Printer Status Routines -
This file contains sample routines for handling status dialogs in a printer driver. It demonstrates how to display status strings in a desktop printer window, and how to conduct various user alerts.